package com.ruoyi.fs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fs.mapper.FsEvidenceRuleMapper;
import com.ruoyi.fs.domain.FsEvidenceRule;
import com.ruoyi.fs.service.IFsEvidenceRuleService;

/**
 * 证据规则Service业务层处理
 * 
 * @author hero
 * @date 2024-08-25
 */
@Service
public class FsEvidenceRuleServiceImpl implements IFsEvidenceRuleService 
{
    @Autowired
    private FsEvidenceRuleMapper fsEvidenceRuleMapper;

    /**
     * 查询证据规则
     * 
     * @param ruleId 证据规则主键
     * @return 证据规则
     */
    @Override
    public FsEvidenceRule selectFsEvidenceRuleByRuleId(Long ruleId)
    {
        return fsEvidenceRuleMapper.selectFsEvidenceRuleByRuleId(ruleId);
    }

    /**
     * 查询证据规则列表
     * 
     * @param fsEvidenceRule 证据规则
     * @return 证据规则
     */
    @Override
    public List<FsEvidenceRule> selectFsEvidenceRuleList(FsEvidenceRule fsEvidenceRule)
    {
        return fsEvidenceRuleMapper.selectFsEvidenceRuleList(fsEvidenceRule);
    }

    /**
     * 新增证据规则
     * 
     * @param fsEvidenceRule 证据规则
     * @return 结果
     */
    @Override
    public int insertFsEvidenceRule(FsEvidenceRule fsEvidenceRule)
    {
        fsEvidenceRule.setCreateTime(DateUtils.getNowDate());
        return fsEvidenceRuleMapper.insertFsEvidenceRule(fsEvidenceRule);
    }

    /**
     * 修改证据规则
     * 
     * @param fsEvidenceRule 证据规则
     * @return 结果
     */
    @Override
    public int updateFsEvidenceRule(FsEvidenceRule fsEvidenceRule)
    {
        fsEvidenceRule.setUpdateTime(DateUtils.getNowDate());
        return fsEvidenceRuleMapper.updateFsEvidenceRule(fsEvidenceRule);
    }

    /**
     * 批量删除证据规则
     * 
     * @param ruleIds 需要删除的证据规则主键
     * @return 结果
     */
    @Override
    public int deleteFsEvidenceRuleByRuleIds(Long[] ruleIds)
    {
        return fsEvidenceRuleMapper.deleteFsEvidenceRuleByRuleIds(ruleIds);
    }

    /**
     * 删除证据规则信息
     * 
     * @param ruleId 证据规则主键
     * @return 结果
     */
    @Override
    public int deleteFsEvidenceRuleByRuleId(Long ruleId)
    {
        return fsEvidenceRuleMapper.deleteFsEvidenceRuleByRuleId(ruleId);
    }
}
